import requests,json
import webbrowser,pyperclip
from urllib.request import quote


# text = pyperclip.paste()
# print(text)
# # webbrowser.open('www.pypypy.cn')
# bookLink = 'https://book.douban.com/subject_search?search_text='+bookName+'&cat=1001'

#导入pyperclip模块。你需要在终端输入命令：pip install pyperclip进行安装
# pyperclip.copy("hello world!")
#pyperclip.copy()将字符串"hello world!"复制到剪切板
# print(pyperclip.paste())
#利用pyperclip.paste()读取剪切板的内容，并打印

bookName = pyperclip.paste()#斗破苍穹
bookLink = 'https://book.douban.com/subject_search?search_text='+bookName+'&cat=1001'

webbrowser.open(bookLink)
